package com.atguigu.cloud.order.feign;

import com.atguigu.cloud.order.feign.fallback.UserFeignClientFallback;
import com.atguigu.cloud.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "spzx-cloud-user",path = "/api/user",fallback = UserFeignClientFallback.class)
public interface UserOpenFeign {

    @GetMapping("/findUserByUserId/{userId}")
    User findOrderByOrderId(@PathVariable("userId") Long userId);
    // 根据userId查询用户信息的接口方法

    @PostMapping("/findUser")
    User findUser(@RequestBody User user) ;
}
